package cn.hwadee.muying.dto;

import cn.hwadee.muying.entity.Job;
import cn.hwadee.muying.enums.Education;
import cn.hwadee.muying.enums.Level;
import com.baomidou.mybatisplus.annotations.TableField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;
/**
 * Created by Mankind on 2018/8/7.
 */
public class Worker  implements Comparable<Worker>{

    /**
     * User表ID
     */
    private Long id;

    /**
     * 创建时间
     */
    private Timestamp createDate;
    /**
     * 更新时间
     */
    private Timestamp updateDate;
    /**
     * 删除时间
     */
    private Timestamp deleteDate;
    /**
     * 是否被删除，取代sql中判断删除时间datetime为null
     */
    private Boolean valid;

    /**
     * 账号
     */
    private String account;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码(md5加密)
     */
    private String password;
    /**
     * 类型名称
     */
    private String type;
    /**
     * 角色id
     */
    private Long rid;
    /**
     * 机构id
     */
    private Long orgId;

    /**
     * 客户信息表id
     */
    private Long workerInfoId;

    /**
     * 照片
     */

    private String image;
    /**
     * 职位id
     */

    private Long job;
    /**
     * 籍贯
     */
    private String nativePlace;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 星座
     */

    private String constellation;
    /**
     * 学历
     */

    private Education education;
    /**
     * 工作经验
     */

    private Integer experience;
    /**
     * 是否已婚
     */

    private Boolean married;
    /**
     * 入职状态
     */
    private Boolean entryStatus;
    /**
     * 是否空闲
     */

    private Boolean free;
    /**
     * 员工等级
     */
    private Level workerLevel;

    private String expectedCity;


    private String telephone;

    private String address;

    private Date birthday;

    private String birthdayString;

    private String email;
    /**
     * 自我介绍
     */
    private String introduction;

    private long nextBirthdayDays;

    private String jobName;

    public Boolean getHasNext() {
        return hasNext;
    }

    public void setHasNext(Boolean hasNext) {
        this.hasNext = hasNext;
    }

    private Boolean hasNext;

    public Level getNextWorkerLevel() {
        return nextWorkerLevel;
    }

    public void setNextWorkerLevel(Level nextWorkerLevel) {
        this.nextWorkerLevel = nextWorkerLevel;
    }

    private Level nextWorkerLevel;

    public Long getNeededTime() {
        return neededTime;
    }

    public void setNeededTime(Long neededTime) {
        this.neededTime = neededTime;
    }

    private Long neededTime;

    public Long getNeedUpgradeMonths() {
        return needUpgradeMonths;
    }

    public void setNeedUpgradeMonths(Long needUpgradeMonths) {
        this.needUpgradeMonths = needUpgradeMonths;
    }

    private Long needUpgradeMonths;

    private BigDecimal startSalary;

    private BigDecimal perSalary;

    private Long star;

    public Long getStar() {
        return star;
    }

    public void setStar(Long star) {
        this.star = star;
    }


    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    private String roleName;

    public BigDecimal getStartSalary() {
        return startSalary;
    }

    public void setStartSalary(BigDecimal startSalary) {
        this.startSalary = startSalary;
    }

    public BigDecimal getPerSalary() {
        return perSalary;
    }

    public void setPerSalary(BigDecimal perSalary) {
        this.perSalary = perSalary;
    }

    public String getExpectedCity() {
        return expectedCity;
    }

    public void setExpectedCity(String expectedCity) {
        this.expectedCity = expectedCity;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public Timestamp getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Timestamp updateDate) {
        this.updateDate = updateDate;
    }

    public Timestamp getDeleteDate() {
        return deleteDate;
    }

    public void setDeleteDate(Timestamp deleteDate) {
        this.deleteDate = deleteDate;
    }

    public Boolean getValid() {
        return valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getRid() {
        return rid;
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public Long getWorkerInfoId() {
        return workerInfoId;
    }

    public void setWorkerInfoId(Long workerInfoId) {
        this.workerInfoId = workerInfoId;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Long getJob() {
        return job;
    }

    public void setJob(Long job) {
        this.job = job;
    }

    public String getNativePlace() {
        return nativePlace;
    }

    public void setNativePlace(String nativePlace) {
        this.nativePlace = nativePlace;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getConstellation() {
        return constellation;
    }

    public void setConstellation(String constellation) {
        this.constellation = constellation;
    }

    public Education getEducation() {
        return education;
    }

    public void setEducation(Education education) {
        this.education = education;
    }

    public Integer getExperience() {
        return experience;
    }

    public void setExperience(Integer experience) {
        this.experience = experience;
    }

    public Boolean getMarried() {
        return married;
    }

    public void setMarried(Boolean married) {
        this.married = married;
    }

    public Boolean getEntryStatus() {
        return entryStatus;
    }

    public void setEntryStatus(Boolean entryStatus) {
        this.entryStatus = entryStatus;
    }

    public Boolean getFree() {
        return free;
    }

    public void setFree(Boolean free) {
        this.free = free;
    }

    public Level getWorkerLevel() {
        return workerLevel;
    }

    public void setWorkerLevel(Level workerLevel) {
        this.workerLevel = workerLevel;
    }

    public long getNextBirthdayDays() {
        return nextBirthdayDays;
    }

    public void setNextBirthdayDays(long NextBirthdayDays) {
        this.nextBirthdayDays = NextBirthdayDays;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getBirthdayString() {
        return birthdayString;
    }

    public void setBirthdayString(String birthdayString) {
        this.birthdayString = birthdayString;
    }

    @Override
    public int compareTo(Worker o) {
        if(getNextBirthdayDays() > o.getNextBirthdayDays()){
            return 1;
        }else if(getNextBirthdayDays() < o.getNextBirthdayDays()){
            return -1;
        }
        return 0;
    }
}
